	//////////////////////////////////////////////////
	//Nazwa		: SDL_LoadImage
	//Autor		: Xezis
	//Data		: 27.12.2009
	//Include	: #include <string>
	//Opis		: Funkcja wczytujaca grafike
	//////////////////////////////////////////////////
	//SDL_Surface *SDL_LoadImage(std::string filename, bool alpha = false);
	//////////////////////////////////////////////////
	SDL_Surface *SDL_LoadImage(std::string filename, bool alpha)
	{
		SDL_Surface* loadedImage = NULL;
		SDL_Surface* optimizedImage = NULL;
		loadedImage = IMG_Load(filename.c_str());
		if(loadedImage != NULL)
		{
			if(!alpha)
			{
				optimizedImage = SDL_DisplayFormat(loadedImage);
			}
			else
			{
				optimizedImage = SDL_DisplayFormatAlpha(loadedImage);
			}
			SDL_FreeSurface(loadedImage);
			if(optimizedImage != NULL)
			{
				SDL_SetColorKey(optimizedImage, SDL_SRCCOLORKEY, SDL_MapRGB(optimizedImage->format, 0, 0xFF, 0xFF));
			}
		}
		return optimizedImage;
	}
	//////////////////////////////////////////////////
